# 当一个元素无法直接定位，没有id,name等确定标识,这个时候我们要考虑css selector定位器
import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.get("https://www.baidu.com")
#  隐式等待
driver.implicitly_wait(10)
driver.find_element(By.CSS_SELECTOR,"a[href*='newspage/data/landingsuper?context=%7B'").click()
time.sleep(2)